GXBufferData
QuickDraw GX sends theGXBufferData
message to send data to the device using the standard buffering mechanism. You can override theGXBufferData
message to provide your own buffering scheme or to change data prior to buffering. Your override of theGXBufferData
message must match the following formal declaration:
OSErr MyBufferData (Ptr data, long length, long bufferOptions);
data
- A pointer to the data to add to the buffer.
length
- The number of bytes of data to add.
bufferOptions
- Options for adding the data to the buffer, as shown in Table 4-10.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX sends theGXBufferData
message in preparation for sending data to
a device using the standard buffering mechanism. This message is sent whenever any message handler wishes to buffer the data to be sent to the printing device.The default implementation of this message uses the default buffering. It buffers the data until all of the buffers are full. You can specify buffering options in the
bufferOptions
parameter. The constants for these options are shown in Table 4-10.When the buffers are completely full, QuickDraw GX sends the
GXDumpBuffer
message to write the data in the buffer to the device and then sends theGXFreeBuffer
message to open the buffer to write additional data.SPECIAL CONSIDERATIONS
You can send theGXBufferData
message to add data to the printer's data stream.If you are implementing your own buffering scheme, you need to perform a total override of the
GXBufferData
message. Otherwise, you need to modify the data and then forward the message.RESULT CODES
The default implementation of the
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. gxGBBufferTooSmallErr The buffer is too small to accept the requested data, and you have specified that buffers are not to be split. GXBufferData
message can also return the communications errors that are listed in Table 4-2 on page 4-42.SEE ALSO
TheGXDumpBuffer
message is described on page 4-142.The
GXFreeBuffer
message is described on page 4-143.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help